package com.twu.biblioteca;

import java.util.ArrayList;

public class User {

    private String customerNumber;
    private String password;
    private String name;
    private String emailAddress;
    private String phoneNumber;
    private ArrayList<Item> items = new ArrayList<Item>();

    User(String customerNumber, String password, String name, String emailAddress, String phoneNumber) {
        this.customerNumber = customerNumber;
        this.password = password;
        this.name = name;
        this.emailAddress = emailAddress;
        this.phoneNumber = phoneNumber;
    }

    String getCustomerNumber() {
        return customerNumber;
    }

    boolean isValidPassword(String password) {
        return this.password.equals(password);
    }

    String getName() {
        return name;
    }

    String getEmailAddress() {
        return emailAddress;
    }

    String getPhoneNumber() {
        return phoneNumber;
    }

    boolean hasBook(Book book) {
        return items.contains(book);
    }

    void checkOut(Item item) {
        items.add(item);
    }

    void returnBook(Item item) {
        items.remove(item);
    }


}
